/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.userorder.entity;

import com.jeeplus.modules.member.entity.Member;
import com.jeeplus.modules.topic.entity.Topic;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import lombok.Data;

/**
 * 用户订单Entity
 * @author zhych
 * @version 2021-08-23
 */
@Data
public class UserOrder extends DataEntity<UserOrder> {
	
	private static final long serialVersionUID = 1L;
	@ExcelField(title="店铺名称", align=2, sort=1)
	private String shopTitle;		// 店铺名称
	@ExcelField(title="微信订单号", align=2, sort=2)
	private String payOrderId;		// 微信订单号
	@ExcelField(title="订单类型", dictType="order_type", align=2, sort=3)
	private String orderType;		// 订单类型
	@ExcelField(title="用户", fieldType=Member.class, value="u.nickname", align=2, sort=4)
	private Member u;		// 用户
	@ExcelField(title="使用时间", align=2, sort=5)
	private String useDate;		// 使用时间
	@ExcelField(title="总金额", align=2, sort=6)
	private String payAmount;		// 总金额
	@ExcelField(title="数量", align=2, sort=7)
	private Integer quantity;		// 数量
	@ExcelField(title="地址", align=2, sort=8)
	private String address;		// 地址
	@ExcelField(title="详细地址", align=2, sort=9)
	private String addressDetail;		// 详细地址
	@ExcelField(title="主题", fieldType=Topic.class, value="topic.title", align=2, sort=10)
	private Topic topic;		// 主题
	@ExcelField(title="门票名称", align=2, sort=11)
	private String topicTitle;		// 门票名称
	@ExcelField(title="门票类型", align=2, sort=12)
	private String ticketType;		// 门票类型
	@ExcelField(title="手机号", align=2, sort=13)
	private String mobile;		// 手机号
	@ExcelField(title="开始时间", align=2, sort=14)
	private String startTime;		// 开始时间
	@ExcelField(title="结束时间", align=2, sort=15)
	private String endTime;		// 结束时间
	@ExcelField(title="凭证号", align=2, sort=16)
	private String authCode;		// 凭证号
	@ExcelField(title="订单状态", dictType="order_state", align=2, sort=17)
	private String orderState;		// 订单状态
	@ExcelField(title="支付状态", dictType="yes_no", align=2, sort=18)
	private String payState;		// 支付状态
	@ExcelField(title="核销人", fieldType=Member.class, value="verify.nickname", align=2, sort=19)
	private Member verify;		// 核销人
	@ExcelField(title="核销人编号", align=2, sort=20)
	private String verifyId;		// 核销人编号
	@ExcelField(title="退款原因", align=2, sort=21)
	private String refundReason;		// 退款原因
	@ExcelField(title="退款金额", align=2, sort=22)
	private String refundMoney;		// 退款金额
	@ExcelField(title="备注", align=2, sort=23)
	private String remark;		// 备注
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="支付时间", align=2, sort=24)
	private Date payDate;		// 支付时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="过期时间", align=2, sort=25)
	private Date outDate;		// 过期时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="完成时间", align=2, sort=26)
	private String finishDate;		// 完成时间
	private Date beginCreateDate;		// 开始 创建时间
	private Date endCreateDate;		// 结束 创建时间

	private String ticketTypeId;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="退款时间", align=2, sort=26)
	private Date refundDate;   // 退款时间

	private String brokerage;

	private String income;
	
	public UserOrder() {
		super();
	}
	
	public UserOrder(String id){
		super(id);
	}
}